package com.example.nettydemo.aio.client;

import com.example.nettydemo.nio.TimeClientHandle;
import lombok.extern.slf4j.Slf4j;

/**
 * @author juzhenxing
 * @date 2020/11/4
 * @description
 */
@Slf4j
public class AioTimeClient {

    public static void main(String[] args) {
        int port = 8080;
        if (args != null && args.length > 0) {
            try {
                port = Integer.valueOf(args[0]);
            } catch (NumberFormatException e) {
                e.printStackTrace();
            }
        }

        new Thread(new AsyncTimeClientHandler(port, "127.0.0.1"), "aio-TimeClient-001").start();
    }
}
